import {reqGetList} from '@/api/systemOptionLog'

const state ={
    docs:'',
    pageInfo:''
}
const mutations = {
    GETLIST(state,{docs,pageInfo}){
          state.docs = docs
          state.pageInfo = pageInfo
    }
}
const actions ={
//   async  getList({commit},data){
//      const { current, pageSize } = data
//     let result = await reqGetList({ current, pageSize })
//       console.log(result)
//     },
    // getList({ commit }, data) {
    //     console.log(data)
    //     const { current, pageSize } = data
    //     return new Promise((resolve, reject) => {
    //         reqGetList({ current, pageSize}).then(response => {      
    //         const { data } = response
    //         console.log(data)
    //         const{docs,pageInfo}= data   
    //         commit('GETLIST',{docs,pageInfo})
    //         resolve()
    //       }).catch(error => {
    //         reject(error)
    //       })
    //     })
    //   },
}

export default{
    state,
    mutations,
    actions
}